package com.example.gzysmartcity.repository.local;

import com.example.gzysmartcity.App;
import com.example.gzysmartcity.repository.model.SearchList;

import java.util.List;

public class SearchListDB {
    public static List<SearchList> loadAll() {
        //清除缓存
        App.getSearchListDao().detachAll();
        return App.getSearchListDao().loadAll();
    }

    public static void insert(SearchList searchList) {
        App.getSearchListDao().insert(searchList);
    }

    public static void clear() {
        App.getSearchListDao().deleteAll();
    }

}
